#pragma once

#include <string>

namespace MiniHttpServer
{
	static std::string StringToString(System::String^ s)
	{
		if (s == nullptr)
			return "";
		array<unsigned char>^ arrayString = System::Text::Encoding::UTF8->GetBytes(s);
		pin_ptr<unsigned char> pString = &arrayString[0];
		return reinterpret_cast<char*>(static_cast<unsigned char*>(pString));
	}
};